<template name="components">
	<view>
		<cu-custom bgImage="https://image.weilanwl.com/color2.0/plugin/cjkz2329.jpg">
			<block slot="content">
				<image src="/static/images/ydcg.png" mode="aspectFill" style="width: 240upx;height: 60upx;"></image>
			</block>
		</cu-custom>
		<view class="cu-card">
			<view class="cu-item bg-img shadow-blur" :style="[{backgroundImage:'url('+item.img+')'}]" @tap="toChild" :data-url="item.url"
			 v-for="(item,index) in list" :key="index">
				<view class="cardTitle">
					<text>
						{{item.title}}
					</text>
					<text class="cardTitle_time">
						开放时间: {{item.time}}
					</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "components",
		data() {
			return {
				StatusBar: this.StatusBar,
				CustomBar: this.CustomBar,
				list: [{
						title: '南校区羽毛球馆',
						img: 'https://image.weilanwl.com/color2.0/plugin/sylb2244.jpg',
						url: '../plugin/indexes',
						time: '8:00 - 22:00'
					},
					{
						title: '南校区乒乓球房',
						img: 'https://image.weilanwl.com/color2.0/plugin/wdh2236.jpg',
						url: '../plugin/animation',
						time: '8:00 - 22:00'
					},
					{
						title: '南校区足球场',
						img: 'https://image.weilanwl.com/color2.0/plugin/qpct2148.jpg',
						url: '../plugin/drawer',
						time: '8:00 - 22:00'
					},
					{
						title: '网球场',
						img: 'https://image.weilanwl.com/color2.0/plugin/qpczdh2307.jpg',
						url: '../plugin/verticalnav',
						time: '8:00 - 22:00'
					},
					{
						title: '游泳馆',
						img: 'https://image.weilanwl.com/color2.0/plugin/wdh2236.jpg',
						url: '../plugin/verticalnav',
						time: '8:00 - 22:00'
					}
				]
			};
		},
		methods: {
			toChild(e) {
				uni.navigateTo({
					url: e.currentTarget.dataset.url
				})
			},
		},
	}
</script>

<style>
	.page {
		height: 100vh;
	}

	.cardTitle {
		color: #fff;
		padding: 90upx 60upx;
		font-size: 40upx;
		font-weight: 300;
		transform: skew(-10deg, 0deg);
		position: relative;
		text-shadow: 0px 0px 6upx rgba(0, 0, 0, 0.3)
	}
	
	.cardTitle_time {
		color: #fff;
		width: 100%;
		font-size: 20upx;
		font-weight: 150;
		position: relative;
		display: block;
	}

	.cardTitle::before {
		content: "";
		position: absolute;
		width: 60upx;
		height: 6upx;
		border-radius: 20upx;
		background-color: #fff;
		display: block;
		top: 60upx;
		left: 50upx;
		transform: skew(10deg, 0deg);
	}

	.cardTitle::after {
		content: "";
		position: absolute;
		width: 140upx;
		border-radius: 6upx;
		height: 24upx;
		background-color: #fff;
		display: block;
		bottom: 76upx;
		left: 90upx;
		transform: skew(10deg, 0deg);
		opacity: 0.1;
	}
</style>